#ifndef _SPECIALCARDPIECESDROP_H_
#define _SPECIALCARDPIECESDROP_H_
#include "SimpleRefection.h"
#include "MgrBase.h"

struct SpecialCardPiecesConfig:public ReflectionBase
{
	DECL_REFLECTION(SpecialCardPiecesConfig,"../../config/SpecialCardPiecesConfig.xml");
	int32 m_iID;
	std::string m_sDisplayName;
	int32 m_iCardPiecesDef;
	int32 m_iExchangeNeedNum;
	std::string  m_sFromDate;
	std::string m_sToDate;

	time_t m_iFromDateTime;
	time_t m_iToDateTime;
	rewrite virtual void OnArchieveReaded();

	bool IsInTime() const;

};
typedef DefMangerTpl<SpecialCardPiecesConfig> __SpecialPiecesConfigManager;
class SpecialPiecesConfigManager:public __SpecialPiecesConfigManager
{
public:
	static SpecialPiecesConfigManager& Instance()
	{
		static SpecialPiecesConfigManager _instance;
		return _instance;
	}
	const SpecialCardPiecesConfig * GetRecentSpecialCardPiecesConfig();
	
private:
	SpecialPiecesConfigManager():m_pSpecialCardPiecesDrop(NULL)
	{
	}
	const SpecialCardPiecesConfig * m_pSpecialCardPiecesDrop;
};



#endif